package com.yubest.demo.controller;

import com.yubest.demo.dto.Demo2DTO;
import com.yubest.demo.dto.DemoDTO;
import com.yubest.demo.dto.Response;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @Author hweiyu
 * @Description
 * @Date 2021/3/1 14:01
 */
@RestController
public class DemoController {

    @PostMapping(value = "/check")
    public Response<Boolean> check(@Valid @RequestBody DemoDTO dto) {
        return Response.success(true);
    }

    @PostMapping(value = "/check2")
    public Response<Boolean> check2(@Valid @RequestBody Demo2DTO dto) {
        return Response.success(true);
    }

}
